{*
 * This file is part of the Agora distribution. 
 * Detailed copyright and licensing information can be found
 * in the gpl-3.0.txt file which should be included in the distribution.
 * 
 * @version		$Id: 3.0.14 Olympus 2010-09-28 rammstein4o $
 * @copyright  2007 - 2010 jVitals
 * @license   GPLv3 Open Source
 * @link       http://jvitals.com
 * @since      File available since initial release
 *}	

{if $rank.id}
<div style="float:left; width: 10%;">
	{include file=configuration/links.tpl}
</div>

{$html->toolbar->title('##Edit rank##')}
{$html->toolbar->save()}
{$html->toolbar->cancel()}

{/if}

<form name="adminForm" method="POST">
	{$html->form->param('option','com_agora')}
	{$html->form->param('task','configuration')}
	{$html->form->param('page','ranks')}
	{$html->form->param('action','save')}
	
	{if $rank.id}
		{$html->form->param('agora_task','configuration')}
	{else}
		{$html->form->param('type','clean')}
	{/if}

	{$html->form->param('id',$rank.id)}
	<div class="width-100">
		<fieldset>
			<legend>##Rank parameters##</legend>
			<table  class="adminlist" cellpadding="0" cellspacing="0" class="aligntop">
				<tr>
					<th class="editlinktip hasTip" title="##Ranks##::##Posts number description##">##Posts number##</th>
					<td>
						<input type="text" name="form[min_posts]" size="25" value="{$rank.min_posts}"/>
					</td>
				</tr>

				<tr>
					<th class="editlinktip hasTip" title="##Ranks##::##Rank_2##">##Rank##</th>
					<td>
						<input type="text" name="form[rank]" value="{$rank.rank}" size="25"/>
					</td>
				</tr>
				
				<tr>
					<th class="editlinktip hasTip" title="##Moderator##::##Moderator Rank_2##">##Moderator##</th>
					<td>
						<input type="radio" name="form[user_type]" value="moderator" {if 'moderator' == $rank.user_type}checked="checked"{/if} />
					</td>
				</tr>
				
				<tr>
					<th class="editlinktip hasTip" title="##Administrator##::##Administrator Rank_2##">##Administrator##</th>
					<td>
						<input type="radio" name="form[user_type]" value="admin" {if 'admin' == $rank.user_type}checked="checked"{/if} />
					</td>
				</tr>								

				<tr>
					<th class="editlinktip hasTip" title="##Ranks##::##Rank image##">##Image##</th>
					<td>
						<input type="radio" name="form[image]" value="" {if !$rank.image}checked="checked"{/if} /><i>##No image##</i><br/>
						{foreach from=$images item=image}
							<input type="radio" name="form[image]" value="{$image.name}" {if $image.name == $rank.image}checked="checked"{/if} />
							<img src="{$image.url}" alt="{$image.name}"/><br/>
						{/foreach}
					</td>
				</tr>

		{if !$rank.id}
				<tr>
					<td colspan="2" align="center">
						<input type="submit" value="##Submit##"/>
						<input type="button" value="##Cancel##" onclick="window.parent.document.getElementById('sbox-window').close();"/>
					</td>
				</tr>
		{/if}
			</table>
		</fieldset>
	</div>
</form>
